<?php
/**
 * Author: 周斌斌 <553193368@qq.com>
 * Date: 17/3/6 PM2:31
 * 摘要:
 */

namespace app\shop\validate;


use think\Validate;

class CartValidate extends Validate
{
    protected $rule = [
        ['goods_id', 'require', '请选择商品'],
        ['goods_num', 'require|between:1,200', '购买商品数量在0到200之间'],
        ['seller_id', 'require', '请选择商户id'],
    ];

    protected $scene = [
        'cart' => ['goods_id', 'goods_num','seller_id'],
        'seller' => ['seller_id']
    ];
}